package http;


import java.util.HashMap;

import io.reactivex.Observable;
import model.AnimeLRYChapterModel;
import model.AnimeLRYSearchModel;
import model.AnimeYHChapterModel;
import model.AnimeYHSearchModel;
import model.BookLRYSearch;
import model.CarrtonKKSearchModel;
import model.CartoonLRYSearchModel;
import model.CarttonKKContentModel;
import model.CarttonKKDirectoryModel;
import model.CarttonKKTypeModel;
import model.CarttonLRYContentModel;
import model.CarttonLRYDirectoryModel;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;


public interface ApiService {


    @GET("https://api.pingcc.cn/video/search/{option}/{key}/{from}/{size}")
    Call<AnimeLRYSearchModel> getLRYSearch(@Path("option") String option, @Path("key") String key, @Path("from") int from, @Path("size") int size);

    @POST("https://fc-mp-8d5a67cf-f10b-4b55-809f-114b87614c96.next.bspapp.com/video/getVideoSearch")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Call<AnimeYHSearchModel> getYHSearch(@Body HashMap map);


    @GET("https://api.pingcc.cn/videoChapter/search/{videoId}")
    Call<AnimeLRYChapterModel> getLRYChapter(@Path("videoId") String videoId);

    @POST("https://fc-mp-8d5a67cf-f10b-4b55-809f-114b87614c96.next.bspapp.com/video/getvideoInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Call<AnimeYHChapterModel> getYHChapter(@Body HashMap map);


    //KK漫画  分类
    //   https://m.kuaikanmanhua.com/v2/mweb/ugc/popularity_rank/topics?diffServerTimestamp=1615824259661&tag_id=20
    @GET("https://m.kuaikanmanhua.com/v2/mweb/ugc/popularity_rank/topics?diffServerTimestamp=1615824259661&")
    Call<CarttonKKTypeModel> getKKCartoonType(@Query("tag_id") String tag_id);


    //KK漫画 漫画详细
//   https://www.kuaikanmanhua.com/v2/pweb/topic/4319
    @GET("https://www.kuaikanmanhua.com/v2/pweb/topic/{id}")
    Call<CarttonKKDirectoryModel> getKKCartoonDetailed(@Path("id") int id);


    //KK漫画 漫画内容
//    https://m.kuaikanmanhua.com/v2/mweb/comic/185112
    @GET("https://m.kuaikanmanhua.com/v2/mweb/comic/{id}")
    Call<CarttonKKContentModel> getKKCartoonContent(@Path("id") int id);


    //KK漫画搜索
    @GET("https://m.kuaikanmanhua.com/search/mini/topic/title_and_author?page=1&size=20&")
    Call<CarrtonKKSearchModel> getKKCartoonSearch(@Query("q") String name);


    //    选择搜索项 标题：title ， 作者 ：author ，分类：comicType
    //LRY 搜索跟分类是同一个接口
    @GET("https://api.pingcc.cn/comic/search/comicType/{key}/{from}/{size}")
    Call<CartoonLRYSearchModel> getLRYCartoonType(@Path("key") String key, @Path("from") int from, @Path("size") int size);

    //    选择搜索项 标题：title ， 作者 ：author ，分类：comicType
    //LRY 搜索跟分类是同一个接口
    @GET("https://api.pingcc.cn/comic/search/title/{key}/{from}/{size}")
    Call<CartoonLRYSearchModel> getLRYCartoonSearch(@Path("key") String key, @Path("from") int from, @Path("size") int size);


    //LRY 章节漫画内容
    @GET("https://api.pingcc.cn/comicChapter/search/{cartoonId}")
    Call<CarttonLRYDirectoryModel> getKLRYCartoonDetailed(@Path("cartoonId") String cartoonId);


    //漫画内容
    @GET("https://api.pingcc.cn/comicContent/search/{chapterId}")
    Call<CarttonLRYContentModel> getLRYCartoonContent(@Path("chapterId") String chapterId);

    //LRY小说
    @GET("http://api.pingcc.cn/fiction/search/{option}/{key}/{from}/{size}")
    Call<BookLRYSearch> getLRYBookSearch(@Path("option") String option, @Path("key") String key, @Path("from") int from, @Path("size") int size);







}
